package com.baizhi.interfacex2;

public class Fish extends Pet implements Swiming{
    public Fish() {
    }

    public Fish(String name, int age, String color) {
        super(name, age, color);
    }

    @Override
    public void eat() {
        System.out.println("这只"+getColor()+"颜色的"+getAge()+"岁的叫"+getName()+"的鱼在吃蚯蚓！！！");
    }

    @Override
    public void swim() {
        System.out.println("这条鱼在自由自在的游泳~~~");
    }
}
